package com.zhouyu;

import com.zhouyu.nine.UserService;
import com.zhouyu.ten.OrderService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * https://www.yuque.com/books/share/5f19528d-d89b-4b69-a7bd-9f436a2dd734/ybkuwi
 *
 * 启动这一块 从 1小时50分开始看后面的事件的逻辑就行
 */
public class Test10 {
	public static void main(String[] args) {

		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig10.class);
//		UserService userService = (UserService) context.getBean("userService");
//		userService.test();

		context.publishEvent("123");

		OrderService orderService = (OrderService) context.getBean("orderService");
		orderService.test();


	}
}
